package com.ydd.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ydd.entity.YddArticle;
import com.ydd.entity.YddUserData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zhangxiaojun
 * @since 2023-05-14
 */
@Mapper
public interface YddUserDataMapper extends BaseMapper<YddUserData> {
    /**
     * 根据用户id,类型,查询文章id
     * @param userId
     * @param type
     * @return
     */
    @Select("select article_id from ydd_user_data where user_id=#{userId} and type=#{type }")
    List<Integer> getArticleId(String userId, String type);
}
